package fatecpg.com.br.japassei;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;


public class SobreActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sobre);
    }

    public void voltar(View view){
        finish();
    }

    public void  configurar(View view){
        Intent int_config = new Intent(this, ConfigActivity.class);
        startActivity(int_config);
    }

    public void acessar(View view){
        Uri webpage = Uri.parse("https://code.google.com/p/ja-passei2/wiki/about_project");
        Intent webIntent = new Intent (Intent.ACTION_VIEW, webpage);
        startActivity(webIntent);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_sobre, menu);
        return true;
    }

    public void hidden(View view){
        Toast.makeText(getApplicationContext(),"Doshta Ulquiorra Schifer desu ka.", Toast.LENGTH_SHORT).show();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}
